   <script src="http://cdn.jsdelivr.net/jquery/2.1.0/jquery.min.js"></script>

    <script type="text/javascript">
  
// Import JSON data
var dailyAPI = "https://api.dailymotion.com/video/<video_id>?fields=onair";

$.getJSON(dailyAPI, function (json) {

    // Set the variables from the results array
    var live = json.onair;
    console.log('Live : ', live);
     

        if (live==true){
            $('#live_display').html('STREAM ON');    // if the variable is set to true display this text.
        }
   

      });          
    </script>


    <p id="live_display">STREAM OFF</p>